﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ContosoUniversity.Models
{
    public class Instructor : Person
    {

        [DataType(DataType.Date), Display(Name = "Hire Date"), DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime HireDate { get; set; }

        private ICollection<Course> _courses;

        public virtual ICollection<Course> Courses
        {
            get { return _courses ?? (_courses = new List<Course>()); }
            set { _courses = value; }
        }
        public virtual OfficeAssignment OfficeAssignment { get; set; }
    }
}